<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let inherit = (function () {
        function Buffer() {}
        return function (Target, Origin) {
          Buffer.prototype = Origin.prototype;
          Target.prototype = new Buffer();
          Target.prototype.constructor = Target;
          Target.prototype.super_class = Origin;
        };
      })();

      Teacher.prototype.name = "Mr.";
      function Teacher() {}
      function Student() {}
      inherit(Student, Teacher);
      let s = new Student();
      console.log(s);
    </script>
  </body>
</html>
